package chapter01

import java.io.{File, PrintWriter}
import scala.io.Source

object extract_ {
  def main(args: Array[String]): Unit={
    //文件的读写操作

    //读取文件
    Source.fromFile("src/main/resources/test.txt").foreach(print)


    //写入文件
    val writer = new PrintWriter(new File("E:\\ideaProjects\\scala_study\\src\\main\\resources\\output.txt"))
    writer.write("hello scala from java writer")
    writer.close()
  }

}
